<alert class="alert-msg" ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}
</alert>

<form class="form-horizontal">
    <div class="box box-info">
        <div class="box-header with-border">
            <h3 class="box-title">1. 商品基本信息</h3>
        </div>
        <div class="box-body">
            <div class="form-group">
                <label class="col-sm-2 control-label">标题</label>

                <div class="col-sm-10">
                    <input type="text" class="form-control" ng-model="currentItem.title">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">图片</label>

                <div class="col-sm-10">
                    <button class="btn btn-primary" ng-click="addImage()">选择图片</button>
                    <img src="{{currentItem.pic}}" ng-show="currentItem.pic" style="width: 50px"/>
                    <input type="text" ng-model="currentItem.pic" hidden>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">描述图片</label>
                <button class="btn btn-primary" ng-click="addOtherImage()">追加图片</button>
                <img src="{{descPic}}" style="width: 50px" ng-repeat="descPic in currentItem.descPicList">
                </img>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">描述</label>

                <div class="col-sm-10">
                    <textarea type="text" class="form-control" ng-model="currentItem.itemDesc"/>
                </div>
            </div>

            <div class="row form-group">
                <div class="col-xs-3" style="display: flex; flex-flow: row">
                    <label class="col-sm-2 control-label">原价</label>
                    <input type="text" class="col-sm-10 form-control" ng-model="currentItem.price">元
                </div>
                <div class="col-xs-4" style="display: flex; flex-flow: row">
                    <label class="col-sm-2 control-label">会员价</label>
                    <input type="text" class="form-control" ng-model="currentItem.vipPrice">元
                </div>
            </div>

            <div class="form-group">

                <div class="col-xs-4" style="display: flex; flex-flow: row">
                    <label class="col-sm-3 control-label">邮费(不填写代表包邮)</label>
                    <input type="text" class="form-control" ng-model="currentItem.postage">
                </div>
                <div class="col-xs-4" style="display: flex; flex-flow: row">
                    <label class="col-sm-3 control-label">佣金</label>
                    <input type="text" class="form-control" ng-model="currentItem.commission">
                </div>

                <div class="col-xs-4" style="display: flex; flex-flow: row">
                    <label class="col-sm-3 control-label">返现</label>
                    <input type="text" class="form-control" ng-model="currentItem.cashBack">
                </div>

            </div>

        </div>

    </div>

    <div class="box box-info">
        <div class="box-header with-border">
            <h3 class="box-title">2. 商品sku信息</h3>
        </div>
        <div class="box-body">

            <!--动态渲染table，table在sku实时变动过程中变化比较难搞，改为加button监听事件搞-->
            <content-table forest-property-value-list="forestPropertyValueList"
                           sku-list="skuList"
                           sku-stock-change="skuStockChange()"
                           sku-image-change="skuImageChange(index)"></content-table>

            商品数量： <input type="text" readonly ng-model="currentItem.stock">

        </div>
    </div>

    <div class="box box-info">
        <div class="box-header with-border">
            <h3 class="box-title">3. 商品其他属性信息</h3>
        </div>
        <div class="box-body">
            <span ng-repeat="featureValue in featureValueList">
                {{featureValue.propertyMetaTitle}}:{{featureValue.value}}
            </span>
        </div>
    </div>


    <button type="submit" class="btn btn-primary" ng-click="updateItem()">
        更新
    </button>

</form>



